class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        n = len(nums)
        harsh_table = dict()
        for i in range(n):
            if target - nums[i] in harsh_table:
                return [harsh_table[target - nums[i]],i]
            else:
                harsh_table[nums[i]] = i
        return []